'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 联盟基本功能--接口集合
 * @author sundbcn@gmail.com (sun debing)
 */

var refresh = require('./unionTask/refresh.js');
var start = require('./unionTask/start.js');
var receive = require('./unionTask/receive.js');
var starBoxReceive = require('./unionTask/starBoxReceive.js');
var direct = require('./unionTask/direct.js');

module.exports = function (app) {
    return new Handler(app);
};

var Handler = function (app) {
    this.app = app;
};

/**
 * 刷新联盟任务
 */
Handler.prototype.refresh = function (msg, session, next) {
    refresh(msg, session, next);
};

/**
 * 开始联盟任务
 */
Handler.prototype.start = function (msg, session, next) {
    start(msg, session, next);
};

/**
 * 开始联盟任务
 */
Handler.prototype.receive = function (msg, session, next) {
    receive(msg, session, next);
};

/**
 * 星级宝箱领取
 */
Handler.prototype.starBoxReceive = function (msg, session, next) {
    starBoxReceive(msg, session, next);
};

/**
 * 星级宝箱领取
 */
Handler.prototype.direct = function (msg, session, next) {
    direct(msg, session, next);
};
